package com.zj;

import com.zj.config.SpringConfig;
import com.zj.dao.StudentDao;
import com.zj.service.StudentService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig.class);
        StudentService service = ctx.getBean(StudentService.class);
        System.out.println(service.selectById(2));



    }
}